<!-- 通用 CSS -->
<head th:fragment="header(title)">
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="" name="keywords">
    <meta content="" name="description">
    <title th:text="${title}"></title>
    <link rel="stylesheet" th:href="@{/common/css/main.css}">
    <link rel="stylesheet" th:href="@{/themes/pear/css/pear.css}">
</head>

<!-- 通用 JAVASCRIPT -->
<div th:fragment="footer">
    <script th:src="@{/plugins/layui/layui.js}"></script>
    <script th:src="@{/themes/pear/pear.js}"></script>
    <script th:src="@{/plugins/jquery/jquery.min.js}"></script>
    <script th:src="@{/common/js/utils.js}"></script>
    <script>
        var popup=null;
        layui.use(['popup'], function () {
            popup = layui.popup;
        });
        // var contextPath = '[[${#request.getContextPath()}]]';
        var contextPath = '[[${#servletContext.contextPath}]]';

        var Template = '[[${Template}]]';
        var MvcMarkName = '[[${MvcMarkName}]]';
        var MvcClassID = '[[${MvcClassID}]]';
        var ActionGUID = '[[${ActionGUID}]]';
        var TableName = '[[${tableName}]]';
        // var contextPath = '[[${#request.getContextPath()}]]';
        var contextPath = '[[${#servletContext.contextPath}]]';

        function createLink(id) {
            return contextPath + "/zhun/post.do?actionguid=" + id + "&Template=" + Template + "&MvcMarkName=" + MvcMarkName + "&MvcClassID=" + MvcClassID;
            //return contextPath + "/zhun/post.do?actionguid=" + id ;
        }

        function ctreatLeftTreeLink(url,tableName){
            return url + '?TableName='+tableName+'&parentId=0&isRoot=true&IsAllStatus=false&parentId=0';
        }


        function reqAjax(_url, _parm, _type, _callback) {
            if (_type == null) _type = "post";
            let loading = layer.load();
            $.ajax({
                url: _url,
                //data: JSON.stringify({ id: this.value, status: operate }),
                data: _parm,
                dataType: 'json',
                //contentType: 'application/json',
                type: _type,
                success: function (result) {
                    layer.close(loading);
                    if (result.success) {
                        popup.success(result.msg);
                        if (_callback) { _callback(); }
                    } else {
                        popup.failure(result.msg);
                    }
                }
            });
        }
    </script>
</div>


